<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>status</title>
    <link rel="stylesheet" href="http://unpkg.com/layui@2.6.8/dist/css/layui.css">
</head>

<script src="http://unpkg.com/layui@2.6.8/dist/layui.js"></script>
<body>
    <table class="layui-table" lay-even lay-skin="row">
        <colgroup>
            <col width="50">
            <col>
            <col>
            <col>
            <col>
            <col>
            <col>
            <col>
            <col>
        </colgroup>
        <thead>
            <tr>
                <th>运行id</th>
                <th>昵称</th>
                <th>题号</th>
                <th>状态</th>
                <th>内存(KB)</th>
                <th>时间(MS)</th>
                <th>语言</th>
                <th>代码长度</th>
                <th>提交时间</th>
            </tr> 
        </thead>
        <tbody>
            {{ range $status := .statuses}}
            <tr>
                <td><a href="status?runid={{ $status.Runid }}">{{ $status.Runid }}</a></td>
                <td>{{ $status.Username }}</td>
                <td>{{ $status.ProblemId }}</td>
                <td>{{ $status.Result }}</td>
                <td>{{ $status.UseMemory }}</td>
                <td>{{ $status.UseTime }}</td>
                <td>{{ $status.Language }}</td>
                <td>{{ $status.Length }}</td>
                <td>{{ $status.SubmitTime }}</td>
            </tr>
            {{ end }}   
        </tbody>
    </table>
    <form>
        <div class="layui-form-item">
            <div class="layui-inline">
                <a href="/status?page={{ .prev_page }}&limit={{ .limit }}">
                    <button type="button" class="layui-btn layui-btn-sm">上一页</button>
                </a>
            </div>
            <div class="layui-inline">
                <a href="/status?page={{ .next_page }}&limit={{ .limit }}">
                    <button type="button" class="layui-btn layui-btn-sm">下一页</button>
                </a>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">页码</label>
                <div class="layui-input-block">
                    <input type="text" id="page" name="page" lay-verify="title" autocomplete="off" class="layui-input"
                        value="{{ .page }}">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">行数</label>
                <div class="layui-input-block">
                    <input type="text" id="limit" name="limit" lay-verify="title" autocomplete="off" class="layui-input"
                        value="{{ .limit }}">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">查询用户</label>
                <div class="layui-input-block">
                    <input type="text" id="search" name="search" lay-verify="title" autocomplete="off" class="layui-input"
                        value="{{ .search }}">
                </div>
            </div>
            <div class="layui-inline">
                    <button type="submit" class="layui-btn layui-btn-sm">跳转</button>
            </div>
        </div>
    </form>
</body>

</html>